package com.cn.zpark.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

/**
 * @PackageName: com.cn.zpark.listener
 * @ClassName: SessionAttributeAddRemoveListener
 * @Description:
 * @author: RZS
 * @date: 2022/4/15  9:31
 */
@WebListener
public class SessionAttributeAddRemoveListener implements HttpSessionAttributeListener {
    @Override
    public void attributeAdded(HttpSessionBindingEvent event) {
        System.out.println("session域中添加的数据");
    }

    @Override
    public void attributeRemoved(HttpSessionBindingEvent event) {
        System.out.println("session域中移除的数据");
    }

    @Override
    public void attributeReplaced(HttpSessionBindingEvent event) {
        System.out.println("session域中更改绑定数据的值");
    }
}
